package com.atguigu.gmall;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.impl.ListDegradeFeignClient;
import com.atguigu.gmall.list.model.SearchParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "service-list",fallback = ListDegradeFeignClient.class)
public interface ListFeignClient {

    /**
     * 跟新商品热度分值
     * @param skuId
     */
    @GetMapping("/api/list/inner/incrHotScore/{skuId}")
    public void incrHotScore(@PathVariable("skuId") Long skuId);

    /**
     * 商品检索
     * @param searchParam
     * @return
     */
    @PostMapping({"/api/list"})
    public Result search(@RequestBody SearchParam searchParam);

    /**
     * 门户页面中商品检索页面渲染
     * @param searchParam
     * @return
     */

}